<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover"><title>East'blog - 生命不息，奋斗不止</title><meta name="author" content="侯玉东"><meta name="copyright" content="侯玉东"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="生命不息，奋斗不止">
<meta property="og:type" content="website">
<meta property="og:title" content="East&#39;blog">
<meta property="og:url" content="https://houyudong1989.gitee.io/blog/page/3/index.html">
<meta property="og:site_name" content="East&#39;blog">
<meta property="og:description" content="生命不息，奋斗不止">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://houyudong1989.gitee.io/blog/img/head.jpg">
<meta property="article:author" content="侯玉东">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://houyudong1989.gitee.io/blog/img/head.jpg"><link rel="shortcut icon" href="/blog/img/head.jpg"><link rel="canonical" href="https://houyudong1989.gitee.io/blog/page/3/index.html"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/blog/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
  root: '/blog/',
  algolia: undefined,
  localSearch: undefined,
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  dateSuffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  infinitegrid: {
    js: 'https://cdn.jsdelivr.net/npm/@egjs/infinitegrid/dist/infinitegrid.min.js',
    buttonText: '加载更多'
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false,
  percent: {
    toc: true,
    rightside: false,
  },
  autoDarkmode: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'East\'blog',
  isPost: false,
  isHome: true,
  isHighlightShrink: false,
  isToc: false,
  postUpdate: '2024-05-16 11:40:00'
}</script><script>(win=>{
      win.saveToLocal = {
        set: (key, value, ttl) => {
          if (ttl === 0) return
          const now = Date.now()
          const expiry = now + ttl * 86400000
          const item = {
            value,
            expiry
          }
          localStorage.setItem(key, JSON.stringify(item))
        },
      
        get: key => {
          const itemStr = localStorage.getItem(key)
      
          if (!itemStr) {
            return undefined
          }
          const item = JSON.parse(itemStr)
          const now = Date.now()
      
          if (now > item.expiry) {
            localStorage.removeItem(key)
            return undefined
          }
          return item.value
        }
      }
    
      win.getScript = (url, attr = {}) => new Promise((resolve, reject) => {
        const script = document.createElement('script')
        script.src = url
        script.async = true
        script.onerror = reject
        script.onload = script.onreadystatechange = function() {
          const loadState = this.readyState
          if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
          script.onload = script.onreadystatechange = null
          resolve()
        }

        Object.keys(attr).forEach(key => {
          script.setAttribute(key, attr[key])
        })

        document.head.appendChild(script)
      })
    
      win.getCSS = (url, id = false) => new Promise((resolve, reject) => {
        const link = document.createElement('link')
        link.rel = 'stylesheet'
        link.href = url
        if (id) link.id = id
        link.onerror = reject
        link.onload = link.onreadystatechange = function() {
          const loadState = this.readyState
          if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
          link.onload = link.onreadystatechange = null
          resolve()
        }
        document.head.appendChild(link)
      })
    
      win.activateDarkMode = () => {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = () => {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
        if (t === 'dark') activateDarkMode()
        else if (t === 'light') activateLightMode()
      
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
      const detectApple = () => {
        if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
          document.documentElement.classList.add('apple')
        }
      }
      detectApple()
    })(window)</script><meta name="generator" content="Hexo 6.3.0"></head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="spinner-box"><div class="configure-border-1"><div class="configure-core"></div></div><div class="configure-border-2"><div class="configure-core"></div></div><div class="loading-word">加载中...</div></div></div><script>(()=>{
  const $loadingBox = document.getElementById('loading-box')
  const $body = document.body
  const preloader = {
    endLoading: () => {
      $body.style.overflow = ''
      $loadingBox.classList.add('loaded')
    },
    initLoading: () => {
      $body.style.overflow = 'hidden'
      $loadingBox.classList.remove('loaded')
    }
  }

  preloader.initLoading()
  window.addEventListener('load',() => { preloader.endLoading() })

  if (true) {
    document.addEventListener('pjax:send', () => { preloader.initLoading() })
    document.addEventListener('pjax:complete', () => { preloader.endLoading() })
  }
})()</script><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="/blog/img/head.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/blog/archives/"><div class="headline">文章</div><div class="length-num">70</div></a><a href="/blog/tags/"><div class="headline">标签</div><div class="length-num">26</div></a><a href="/blog/categories/"><div class="headline">分类</div><div class="length-num">18</div></a></div><hr class="custom-hr"/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/blog/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/blog/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/blog/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/blog/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/blog/link/"><i class="fa-fw fas fa-link"></i><span> 友联</span></a></div><div class="menus_item"><a class="site-page" href="/blog/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div></div></div><div class="page" id="body-wrap"><header class="full_page fixed" id="page-header" style="background-image: url('https://staticqn.qizuang.com/meitu/20200429/5ea8f9b2d86bb-s5.jpg')"><nav id="nav"><span id="blog-info"><a href="/blog/" title="East'blog"><img class="site-icon" src="/blog/img/head.jpg"/><span class="site-name">East'blog</span></a></span><div id="menus"><div class="menus_items"><div class="menus_item"><a class="site-page" href="/blog/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/blog/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/blog/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/blog/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/blog/link/"><i class="fa-fw fas fa-link"></i><span> 友联</span></a></div><div class="menus_item"><a class="site-page" href="/blog/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div><div id="toggle-menu"><a class="site-page" href="javascript:void(0);"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="site-info"><h1 id="site-title">East'blog</h1><div id="site-subtitle"><span id="subtitle"></span></div><div id="site_social_icons"><a class="social-icon" href="https://gitee.com/houyudong1989" target="_blank" title="Github"><i class="fab fa-github" style="color: #24292e;"></i></a><a class="social-icon" href="mailto:420098321@qq.com" target="_blank" title="Email"><i class="fas fa-envelope" style="color: #4a7dbe;"></i></a></div></div><div id="scroll-down"><i class="fas fa-angle-down scroll-down-effects"></i></div></header><main class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div class="recent-post-item"><div class="post_cover left"><a href="/blog/2024/03/01/python/1%E3%80%81%E6%AD%A3%E5%88%99%E8%A1%A8%E8%BE%BE%E5%BC%8F/" title="正则表达式"><img class="post-bg" src="/blog/img/library1.jpeg" onerror="this.onerror=null;this.src='/blog/img/friend_404.gif'" alt="正则表达式"></a></div><div class="recent-post-info"><a class="article-title" href="/blog/2024/03/01/python/1%E3%80%81%E6%AD%A3%E5%88%99%E8%A1%A8%E8%BE%BE%E5%BC%8F/" title="正则表达式">正则表达式</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2024-03-01T01:52:40.464Z" title="发表于 2024-03-01 09:52:40">2024-03-01</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/blog/categories/python-%E7%88%AC%E8%99%AB/">python 爬虫</a></span></div><div class="content">概述1234* 正则表达式（Regular Expression）是一种用来描述字符串模式的工具，它提供了一种灵活、强大且通用的方式来匹配、搜索和替换文本中的字符序列。正则表达式通常由普通字符（例如字母、数字、符号等）和元字符（特殊字符）组成，通过这些字符的组合形成一个模式，用以描述需要匹配的字符串形式。* 最早的正则表达式来源于Peri语言，后面其他的编程语言在提供正则表达式操作时基本沿用了Per语言的正则语法，所以我们学习正则以后，可以在java，php，go，javascript，sql，python，c++等编程语言中使用。正则对字符串或文本的操作，无非是分割、匹配、查找和替换。

元字符(Metacharacters)元字符是具有特殊含义的字符。



元字符
描述



[ ]
匹配一个中括号中出现的任意原子


[^原子]
匹配一个没有在中括号出现的任意原子


\
转义字符，可以把原子转换特殊元字符，也可以把特殊元字符转成原子。


^
叫开始边界符或开始锚点符，匹配一行的开头位置   (在[]中又有取反之意)


$
叫结束边界符或结束锚点符，匹配一行的结束位置


 ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/blog/2024/02/24/c++/3%E3%80%81%E8%BF%90%E7%AE%97%E7%AC%A6%E5%92%8C%E8%A1%A8%E8%BE%BE%E5%BC%8F/" title="运算符"><img class="post-bg" src="/blog/img/library1.jpeg" onerror="this.onerror=null;this.src='/blog/img/friend_404.gif'" alt="运算符"></a></div><div class="recent-post-info"><a class="article-title" href="/blog/2024/02/24/c++/3%E3%80%81%E8%BF%90%E7%AE%97%E7%AC%A6%E5%92%8C%E8%A1%A8%E8%BE%BE%E5%BC%8F/" title="运算符">运算符</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2024-02-24T03:22:56.507Z" title="发表于 2024-02-24 11:22:56">2024-02-24</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/blog/categories/c/">c</a></span></div><div class="content">运算符和表达式
运算符：

1运算符用于执行程序代码运算，会针对一个以上操作数来进行运算。例如：2+3，其操作数是2和3，而运算符则是“+”


操作数：

1是运算符作用于的实体，操作数指出指令执行的操作所需要数据的来源。


表达式：

1是由数字、运算符、数字分组符号（括号）、自由变量等以能求得数值的有意义排列方法所得的组合。


表达式书写规则

123* 运算符不能相邻。例a+/b是错误的* 运算符不能省略。例x乘以y，应写成x*y，而不是xy* 可用多层括号表示运算次序，括号必须成对出现，均使用小括号。


运算符优先级和结合性

12345所谓优先级就是当一个表达式中有多个运算符时，先计算谁，后计算谁。这个其实我们在小学学算术的时候就学过，如 1+4÷（2+8）那么“结合性”是什么呢？优先级都是关于优先级不同的运算符参与运算时先计算谁后计算谁。但是如果运算符的优先级相同，那么先计算谁后计算谁呢？这个就是由“结合性”决定的。比如 `1+2×3÷4`，乘和除的优先级相同，但是计算的时候是从左往右，即先计算乘再计算除，所以乘和除的结合性就是从左往右。就是这么简单！

运算符分类 ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/blog/2024/02/24/c++/1%E3%80%81%E5%B8%B8%E9%87%8F%E3%80%81%E5%8F%98%E9%87%8F%E5%92%8C%E5%9F%BA%E6%9C%AC%E7%B1%BB%E5%9E%8B/" title="常量、变量、基本类型"><img class="post-bg" src="/blog/img/library1.jpeg" onerror="this.onerror=null;this.src='/blog/img/friend_404.gif'" alt="常量、变量、基本类型"></a></div><div class="recent-post-info"><a class="article-title" href="/blog/2024/02/24/c++/1%E3%80%81%E5%B8%B8%E9%87%8F%E3%80%81%E5%8F%98%E9%87%8F%E5%92%8C%E5%9F%BA%E6%9C%AC%E7%B1%BB%E5%9E%8B/" title="常量、变量、基本类型">常量、变量、基本类型</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2024-02-24T02:53:32.587Z" title="发表于 2024-02-24 10:53:32">2024-02-24</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/blog/categories/c/">c</a></span></div><div class="content">常量、变量、基本类型整型常量123整数常量可以是十进制、八进制或十六进制的常量。前缀指定基数：0x 或 0X 表示十六进制，0 表示八进制，不带前缀则默认表示十进制(VS2019支持二进制常量表示：0b或0B表示二进制)。整数常量也可以带一个后缀，后缀是 U 和 L 的组合，U 表示无符号整数（unsigned），L 表示长整数（long）。后缀可以是大写，也可以是小写，U 和 L 的顺序任意。


二进制表示方式，前面加0b或0B表示二进制数

120b000011110B00001111


八进制表示方式,在数值前加0表示八进制数，因为在10进制数前面加0没有任何意义 如：

12012308 // 无效数据，取值0-7


十进制表示方式，数值默认表现形式为十进制

1123


十六进制表示方式，前面加0x或0X表示二进制数

120x13ab0XAB1a


数值加后缀表示,可以在数值后面加上u或者l，大小写皆可以

1234567435       //表示 int 类型532L      //表示 long 类型432U      //表示 unsigned int 类 ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/blog/2024/02/23/c++/0%E3%80%81%E5%9F%BA%E7%A1%80%E5%86%85%E5%AE%B9/" title="基础内容"><img class="post-bg" src="/blog/img/library1.jpeg" onerror="this.onerror=null;this.src='/blog/img/friend_404.gif'" alt="基础内容"></a></div><div class="recent-post-info"><a class="article-title" href="/blog/2024/02/23/c++/0%E3%80%81%E5%9F%BA%E7%A1%80%E5%86%85%E5%AE%B9/" title="基础内容">基础内容</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2024-02-23T01:31:40.831Z" title="发表于 2024-02-23 09:31:40">2024-02-23</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/blog/categories/c-kotlin/">c++ kotlin</a></span></div><div class="content">进制对照表


十进制
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15



二进制
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111


八进制
0
1
2
3
4
5
6
7
10
11
12
13
14
15
16
17


十六进制
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F


2的n次方表


2^0
2^1
2^2
2^3
2^4
2^5
2^6
2^7
2^8
2^9
2^10



1
10
100
1000
10000
100000
1000000
10000000
100000000
1000000000
10000000000


1
2
4
8
16
32
64
128
256
512
1024


32个关键字


类型
关键字
解释



基本数据类型
void
空类型



char
字符型



int
整型



float
单精度浮点型



double
双精度浮点型


类型修饰关键字
s ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/blog/2024/02/22/c++/2%E3%80%81%E8%BF%9B%E5%88%B6%E8%BD%AC%E6%8D%A2%E5%92%8C%E5%AD%98%E5%82%A8%E6%A8%A1%E5%9E%8B/" title="进制转换和存储模型"><img class="post-bg" src="/blog/img/library1.jpeg" onerror="this.onerror=null;this.src='/blog/img/friend_404.gif'" alt="进制转换和存储模型"></a></div><div class="recent-post-info"><a class="article-title" href="/blog/2024/02/22/c++/2%E3%80%81%E8%BF%9B%E5%88%B6%E8%BD%AC%E6%8D%A2%E5%92%8C%E5%AD%98%E5%82%A8%E6%A8%A1%E5%9E%8B/" title="进制转换和存储模型">进制转换和存储模型</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2024-02-22T02:00:29.871Z" title="发表于 2024-02-22 10:00:29">2024-02-22</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/blog/categories/c/">c++</a></span></div><div class="content">进制概述1进制是一种用于表示数字的方法，常见的进制包括二进制（base-2）、八进制（base-8）、十进制（base-10）和十六进制（base-16）。每种进制都有对应的数字表示方式和计算规则。在计算机领域，二进制是最基础的进制，因为计算机内部使用的是二进制形式表示数据；八进制和十六进制常用于表示和处理数据；而十进制则是人们日常生活中最常用的进制。

二进制（Binary）
组成

1只包含 0 和 1 两个数字，是计算机中最基础的进制。


规则

1逢2进1


示例

1例如，1011 表示十进制的 11。

八进制（Octal）
组成

1包含数字 0 到 7，每个八进制位相当于三个二进制位。


规则

1逢8进1


示例

1例如，23 表示十进制的 19。

十进制（Decimal）
组成

1我们平常使用的数字系统，包含数字 0 到 9，每个位置代表 10 的幂次方。


规则

1逢10进1


示例

1例如，123 表示 1 * 10^2 + 2 * 10^1 + 3 * 10^0 = 123。

十六进制（Hexadecimal）
组成

1包含数字 0  ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/blog/2024/02/04/kotlin/kotlin%E5%9F%BA%E7%A1%80/" title="kotlin基础-基本类型"><img class="post-bg" src="/blog/img/library1.jpeg" onerror="this.onerror=null;this.src='/blog/img/friend_404.gif'" alt="kotlin基础-基本类型"></a></div><div class="recent-post-info"><a class="article-title" href="/blog/2024/02/04/kotlin/kotlin%E5%9F%BA%E7%A1%80/" title="kotlin基础-基本类型">kotlin基础-基本类型</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2024-02-04T03:24:55.211Z" title="发表于 2024-02-04 11:24:55">2024-02-04</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/blog/categories/kotlin%E5%9F%BA%E7%A1%80/">kotlin基础</a></span></div><div class="content">基本类型1在Kotlin中，所有东西都是对象，在这个意义上讲我们可以在任何变量上调用成员函数和属性。一些类型可以有特殊的内部表示——例如，数字、字符和布尔值可以在运行时表示为原生类型值，但是对于用户来说，它们看起来就像普通的类。

数字类型


类型
字节



Double
64


Float
32


Long
64


Int
32


Short
16


Byte
8


字面常量表示
十进制表示

12所有整数默认采用十进制表示，如：123如果表示Long类型使用大写L标记，如：123L


十六进制表示

1十六进制使用0x或者0X进行表示，如：0X0F，0x0a


二进制表示

1二进制使用0b或者0B进行表示，如：0B00001101，0b11100001


浮点数表示

12所有浮点数默认使用Double类型，如：123.45如果使用Float类型，使用f进行标记，如：123.45f，123.45F


下划线表示数值

1234为了让数字常量更容易阅读，支持使用下划线进行标记，如：* 十进制：1_000_000_000  22_000_111L* 二进制：0 ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/blog/2024/01/20/harmonyOS/ArkUI-X/" title="ArkUI-X"><img class="post-bg" src="/blog/img/library1.jpeg" onerror="this.onerror=null;this.src='/blog/img/friend_404.gif'" alt="ArkUI-X"></a></div><div class="recent-post-info"><a class="article-title" href="/blog/2024/01/20/harmonyOS/ArkUI-X/" title="ArkUI-X">ArkUI-X</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2024-01-20T13:21:19.326Z" title="发表于 2024-01-20 21:21:19">2024-01-20</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/blog/categories/harmonyOS/">harmonyOS</a></span></div><div class="content">概述12ArkUI是一套构建分布式应用的声明式UI开发框架。它具备简洁自然的UI信息语法、丰富的UI组件、多维的状态管理，以及实时界面预览等相关能力，帮助您提升应用开发效率，并能在多种设备上实现生动而流畅的用户体验。ArkUI-X进一步将ArkUI扩展到了多个OS平台：目前支持OpenHarmony、HarmonyOS、Android、 iOS，后续会逐步增加更多平台支持。开发者基于一套主代码，就可以构建支持多平台的精美、高性能应用。


关键特征

12345* 简洁自然的声明式语法。* 高效的渲染管线以及平台一致性的渲染机制。* 高效的方舟编译器以及运行时。* 统一的跨平台API能力集以及扩展机制。* 动态化特性


技术架构


术语
ArkUI1方舟开发框架（简称：ArkUI），是一套构建OpenHarmony应用界面的UI开发框架，它提供了简洁自然的UI语法与包括UI组件、动画机制、事件交互等在内的UI开发基础设施，以满足应用开发者的可视化界面开发需求。 
ArkUI-X1ArkUI-X，是扩展ArkUI开发框架到多个OS平台，目前支持OpenHarmony、HarmonyO ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/blog/2023/12/26/harmonyOS/router%E8%B7%AF%E7%94%B1/" title="router路由跳转"><img class="post-bg" src="/blog/img/library1.jpeg" onerror="this.onerror=null;this.src='/blog/img/friend_404.gif'" alt="router路由跳转"></a></div><div class="recent-post-info"><a class="article-title" href="/blog/2023/12/26/harmonyOS/router%E8%B7%AF%E7%94%B1/" title="router路由跳转">router路由跳转</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-12-26T08:18:04.599Z" title="发表于 2023-12-26 16:18:04">2023-12-26</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/blog/categories/harmonyOS/">harmonyOS</a></span></div><div class="content">概述123页面路由指在应用程序中实现不同页面之间的跳转和数据传递。HarmonyOS提供了Router模块，通过不同的url地址，可以方便地进行页面路由，轻松地访问不同的页面。 之前我们通过Uicontext来实现不同UIability的跳转，但是我们通常建议在一个应用中最好只存在一个Uiability，更多情况下，我们通过router来进行不同page间的跳转。在使用router之前，需要导入router：import router from &#x27;@ohos.router&#x27;;

同一模块间跳转
在同一模块间进行跳转，url只需要传递对应page路径即可，如：

1url: &#x27;pages/login/LoginPage&#x27; 

跨模块跳转
跨模块间页面进行跳转，url需要传递@bundle:应用包名&#x2F;动态库名称&#x2F;ets&#x2F;pages&#x2F;页面名称，如：

1url: &quot;@bundle:com.***.***/webview/ets/pages/WebPage&quot;

跳转模式1router路由有两种跳 ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/blog/2023/12/20/git/linux%E6%9C%8D%E5%8A%A1%E5%99%A8%E5%88%9B%E5%BB%BAgit%E4%BB%93%E5%BA%93/" title="git仓库创建与提交"><img class="post-bg" src="/blog/img/library1.jpeg" onerror="this.onerror=null;this.src='/blog/img/friend_404.gif'" alt="git仓库创建与提交"></a></div><div class="recent-post-info"><a class="article-title" href="/blog/2023/12/20/git/linux%E6%9C%8D%E5%8A%A1%E5%99%A8%E5%88%9B%E5%BB%BAgit%E4%BB%93%E5%BA%93/" title="git仓库创建与提交">git仓库创建与提交</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-12-20T07:15:59.373Z" title="发表于 2023-12-20 15:15:59">2023-12-20</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/blog/categories/git/">git</a></span></div><div class="content">git 创建远程仓库1git init -bare

git 创建本地仓库本地库创建1git init

更改仓库名称12新版本git默认主分支为main，而老版本git默认主分支为master。为了避免分支名不一致，在创建好本地仓库以后，把本地仓库主分支名称修改为mastergit branch -m main master

将文件的更改添加到暂存区
将单个文件添加到暂存区

1git add myfile.txt         


添加多个文件到暂存区

1git add file1.js file2.js   


添加当前目录下的所有文件到暂存区

1git add .                  

提交文件,将暂存区的1git commit -m &quot;提交信息&quot;

查看远程仓库地址1git remote -v

关联远程仓库1git remote add origin ssh://用户名@ip地址:端口号/仓库地址

将本地代码推送到远程仓库
本地代码推送到远程仓库，并与远程仓库进行关联
-u 或 --set-upstream 作用相同

1g ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/blog/2023/12/15/harmonyOS/Canvas%E7%BB%98%E5%88%B6%E6%8A%98%E7%BA%BF%E5%9B%BE/" title="canvas绘制折线图"><img class="post-bg" src="/blog/img/library1.jpeg" onerror="this.onerror=null;this.src='/blog/img/friend_404.gif'" alt="canvas绘制折线图"></a></div><div class="recent-post-info"><a class="article-title" href="/blog/2023/12/15/harmonyOS/Canvas%E7%BB%98%E5%88%B6%E6%8A%98%E7%BA%BF%E5%9B%BE/" title="canvas绘制折线图">canvas绘制折线图</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-12-15T02:06:56.468Z" title="发表于 2023-12-15 10:06:56">2023-12-15</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/blog/categories/harmonyOS/">harmonyOS</a></span></div><div class="content">需求概述1之前使用canvas制作了一个柱状图，今天又需要制作一个折线图。先上个效果图


思路
整个图分为几个步骤
1、绘制渐变背景
2、绘制折线
3、绘制折线渐变层
4、绘制关键点
5、绘制标签

渐变色
系统提供了绘制渐变色的对象，针对canvas我们可以使用CanvasGradient对象来进行渐变色处理，针对普通控件，提供了
linearGradient()
sweepGradient()
radialGradient()
三个绘制不同样式渐变效果的属性，针对渐变色具体使用，后期单独整理一份渐变色使用的笔记。

绘制渐变背景123456789101112131415背景渐变色直接在canvas对象上进行设置，通过设置linearGradient属性，设置渐变颜色达到目标效果。代码如下： Canvas(this.paint)      .width(&#x27;90%&#x27;) //设置画布宽度      .height(190)// 设置画布高度      .margin(30) //设置画布的间距      .borderRadius(20)//设置画布圆角       ...</div></div></div><nav id="pagination"><div class="pagination"><a class="extend prev" rel="prev" href="/blog/page/2/#content-inner"><i class="fas fa-chevron-left fa-fw"></i></a><a class="page-number" href="/blog/">1</a><a class="page-number" href="/blog/page/2/#content-inner">2</a><span class="page-number current">3</span><a class="page-number" href="/blog/page/4/#content-inner">4</a><span class="space">&hellip;</span><a class="page-number" href="/blog/page/7/#content-inner">7</a><a class="extend next" rel="next" href="/blog/page/4/#content-inner"><i class="fas fa-chevron-right fa-fw"></i></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="/blog/img/head.jpg" onerror="this.onerror=null;this.src='/blog/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">侯玉东</div><div class="author-info__description">生命不息，奋斗不止</div></div><div class="card-info-data site-data is-center"><a href="/blog/archives/"><div class="headline">文章</div><div class="length-num">70</div></a><a href="/blog/tags/"><div class="headline">标签</div><div class="length-num">26</div></a><a href="/blog/categories/"><div class="headline">分类</div><div class="length-num">18</div></a></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://gitee.com/houyudong1989"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://gitee.com/houyudong1989" target="_blank" title="Github"><i class="fab fa-github" style="color: #24292e;"></i></a><a class="social-icon" href="mailto:420098321@qq.com" target="_blank" title="Email"><i class="fas fa-envelope" style="color: #4a7dbe;"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">欢迎来到我的博客！！！</div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/blog/2024/05/06/c++/5%E3%80%81%E5%AD%97%E7%AC%A6%E5%92%8C%E5%AD%97%E7%AC%A6%E4%B8%B2/" title="字符和字符串"><img src="/blog/img/library1.jpeg" onerror="this.onerror=null;this.src='/blog/img/friend_404.gif'" alt="字符和字符串"/></a><div class="content"><a class="title" href="/blog/2024/05/06/c++/5%E3%80%81%E5%AD%97%E7%AC%A6%E5%92%8C%E5%AD%97%E7%AC%A6%E4%B8%B2/" title="字符和字符串">字符和字符串</a><time datetime="2024-05-06T11:15:27.280Z" title="发表于 2024-05-06 19:15:27">2024-05-06</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/blog/2024/05/06/c++/4%E3%80%81%E6%8C%87%E9%92%88%E5%92%8C%E5%87%BD%E6%95%B0%E6%8C%87%E9%92%88/" title="指针和函数指针"><img src="/blog/img/library1.jpeg" onerror="this.onerror=null;this.src='/blog/img/friend_404.gif'" alt="指针和函数指针"/></a><div class="content"><a class="title" href="/blog/2024/05/06/c++/4%E3%80%81%E6%8C%87%E9%92%88%E5%92%8C%E5%87%BD%E6%95%B0%E6%8C%87%E9%92%88/" title="指针和函数指针">指针和函数指针</a><time datetime="2024-05-06T11:14:29.047Z" title="发表于 2024-05-06 19:14:29">2024-05-06</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/blog/2024/05/05/python/7%E3%80%81m3u8%E8%A7%86%E9%A2%91%E6%A0%BC%E5%BC%8F/" title="m3u8格式"><img src="/blog/img/library1.jpeg" onerror="this.onerror=null;this.src='/blog/img/friend_404.gif'" alt="m3u8格式"/></a><div class="content"><a class="title" href="/blog/2024/05/05/python/7%E3%80%81m3u8%E8%A7%86%E9%A2%91%E6%A0%BC%E5%BC%8F/" title="m3u8格式">m3u8格式</a><time datetime="2024-05-05T01:43:26.865Z" title="发表于 2024-05-05 09:43:26">2024-05-05</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/blog/2024/04/30/android/charles%E5%AE%89%E5%8D%93%E6%89%8B%E6%9C%BA%E6%8A%93%E5%8C%85/" title="charles 抓包"><img src="/blog/img/library1.jpeg" onerror="this.onerror=null;this.src='/blog/img/friend_404.gif'" alt="charles 抓包"/></a><div class="content"><a class="title" href="/blog/2024/04/30/android/charles%E5%AE%89%E5%8D%93%E6%89%8B%E6%9C%BA%E6%8A%93%E5%8C%85/" title="charles 抓包">charles 抓包</a><time datetime="2024-04-30T06:49:29.279Z" title="发表于 2024-04-30 14:49:29">2024-04-30</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/blog/2024/04/26/python/13%E3%80%81playwright/" title="playwright"><img src="/blog/img/library1.jpeg" onerror="this.onerror=null;this.src='/blog/img/friend_404.gif'" alt="playwright"/></a><div class="content"><a class="title" href="/blog/2024/04/26/python/13%E3%80%81playwright/" title="playwright">playwright</a><time datetime="2024-04-26T07:30:36.069Z" title="发表于 2024-04-26 15:30:36">2024-04-26</time></div></div></div></div><div class="card-widget card-categories"><div class="item-headline">
            <i class="fas fa-folder-open"></i>
            <span>分类</span>
            <a class="card-more-btn" href="/blog/categories/" title="查看更多">
    <i class="fas fa-angle-right"></i></a>
            </div>
            <ul class="card-category-list" id="aside-cat-list">
            <li class="card-category-list-item "><a class="card-category-list-link" href="/blog/categories/c/"><span class="card-category-list-name">c</span><span class="card-category-list-count">2</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/blog/categories/c/"><span class="card-category-list-name">c++</span><span class="card-category-list-count">3</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/blog/categories/c-kotlin/"><span class="card-category-list-name">c++ kotlin</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/blog/categories/c-%E5%AD%97%E7%AC%A6%E5%92%8C%E5%AD%97%E7%AC%A6%E4%B8%B2/"><span class="card-category-list-name">c++ 字符和字符串</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/blog/categories/c-%E6%8C%87%E9%92%88/"><span class="card-category-list-name">c++ 指针</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/blog/categories/charles-%E6%8A%93%E5%8C%85-%E7%88%AC%E8%99%AB/"><span class="card-category-list-name">charles 抓包 爬虫</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/blog/categories/git/"><span class="card-category-list-name">git</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/blog/categories/harmonyOS/"><span class="card-category-list-name">harmonyOS</span><span class="card-category-list-count">25</span></a></li>
            </ul></div><div class="card-widget card-tags"><div class="item-headline"><i class="fas fa-tags"></i><span>标签</span></div><div class="card-tag-cloud"><a href="/blog/tags/requests%E6%A8%A1%E5%9D%97%E4%BD%BF%E7%94%A8/" style="font-size: 1.1em; color: #999">requests模块使用</a> <a href="/blog/tags/c/" style="font-size: 1.2em; color: #999da3">c</a> <a href="/blog/tags/%E6%91%98%E8%A6%81%E7%AE%97%E6%B3%95%E3%80%81URL%E7%BC%96%E7%A0%81%E5%92%8Cbase64%E7%BC%96/" style="font-size: 1.1em; color: #999">摘要算法、URL编码和base64编</a> <a href="/blog/tags/xpath%E4%BD%BF%E7%94%A8/" style="font-size: 1.1em; color: #999">xpath使用</a> <a href="/blog/tags/http%E5%8D%8F%E8%AE%AE/" style="font-size: 1.1em; color: #999">http协议</a> <a href="/blog/tags/git/" style="font-size: 1.1em; color: #999">git</a> <a href="/blog/tags/c-%E5%AD%97%E7%AC%A6%E5%92%8C%E5%AD%97%E7%AC%A6%E4%B8%B2/" style="font-size: 1.1em; color: #999">c++ 字符和字符串</a> <a href="/blog/tags/playwright/" style="font-size: 1.1em; color: #999">playwright</a> <a href="/blog/tags/UA%E5%92%8CReferer%E5%8F%8D%E7%88%AC/" style="font-size: 1.1em; color: #999">UA和Referer反爬</a> <a href="/blog/tags/mongodb/" style="font-size: 1.1em; color: #999">mongodb</a> <a href="/blog/tags/harmonyOS-FAQ/" style="font-size: 1.1em; color: #999">harmonyOS  FAQ</a> <a href="/blog/tags/harmonyOS-context/" style="font-size: 1.1em; color: #999">harmonyOS context</a> <a href="/blog/tags/bs4/" style="font-size: 1.1em; color: #999">bs4</a> <a href="/blog/tags/%E4%BF%A1%E6%81%AF%E9%A1%B9%E7%9B%AE%E7%AE%A1%E7%90%86%E5%B8%88-%E9%A1%B9%E7%9B%AE%E7%AE%A1%E7%90%86/" style="font-size: 1.4em; color: #99a5b6">信息项目管理师,项目管理</a> <a href="/blog/tags/%E7%BA%BF%E7%A8%8B%E3%80%81%E8%BF%9B%E7%A8%8B%E5%92%8C%E5%8D%8F%E7%A8%8B/" style="font-size: 1.1em; color: #999">线程、进程和协程</a> <a href="/blog/tags/%E7%88%AC%E8%99%AB%E4%BB%8B%E7%BB%8D/" style="font-size: 1.1em; color: #999">爬虫介绍</a> <a href="/blog/tags/kotlin/" style="font-size: 1.1em; color: #999">kotlin</a> <a href="/blog/tags/m3u8%E6%A0%BC%E5%BC%8F/" style="font-size: 1.1em; color: #999">m3u8格式</a> <a href="/blog/tags/harmonyOS/" style="font-size: 1.5em; color: #99a9bf">harmonyOS</a> <a href="/blog/tags/%E6%AD%A3%E5%88%99%E8%A1%A8%E8%BE%BE%E5%BC%8F/" style="font-size: 1.1em; color: #999">正则表达式</a> <a href="/blog/tags/%E5%8A%A0%E5%AF%86%E7%AE%97%E6%B3%95/" style="font-size: 1.1em; color: #999">加密算法</a> <a href="/blog/tags/c/" style="font-size: 1.3em; color: #99a1ac">c++</a> <a href="/blog/tags/charles-%E6%8A%93%E5%8C%85/" style="font-size: 1.1em; color: #999">charles 抓包</a> <a href="/blog/tags/c-%E6%8C%87%E9%92%88/" style="font-size: 1.1em; color: #999">c++ 指针</a> <a href="/blog/tags/cookie%E5%92%8Csession/" style="font-size: 1.1em; color: #999">cookie和session</a> <a href="/blog/tags/c-kotlin/" style="font-size: 1.1em; color: #999">c++ kotlin</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>归档</span><a class="card-more-btn" href="/blog/archives/" title="查看更多">
    <i class="fas fa-angle-right"></i></a></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/blog/archives/2024/05/"><span class="card-archive-list-date">五月 2024</span><span class="card-archive-list-count">3</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/blog/archives/2024/04/"><span class="card-archive-list-date">四月 2024</span><span class="card-archive-list-count">12</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/blog/archives/2024/03/"><span class="card-archive-list-date">三月 2024</span><span class="card-archive-list-count">6</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/blog/archives/2024/02/"><span class="card-archive-list-date">二月 2024</span><span class="card-archive-list-count">5</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/blog/archives/2024/01/"><span class="card-archive-list-date">一月 2024</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/blog/archives/2023/12/"><span class="card-archive-list-date">十二月 2023</span><span class="card-archive-list-count">8</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/blog/archives/2023/11/"><span class="card-archive-list-date">十一月 2023</span><span class="card-archive-list-count">26</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/blog/archives/2023/10/"><span class="card-archive-list-date">十月 2023</span><span class="card-archive-list-count">4</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>网站资讯</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">文章数目 :</div><div class="item-count">70</div></div><div class="webinfo-item"><div class="item-name">本站访客数 :</div><div class="item-count" id="busuanzi_value_site_uv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">本站总访问量 :</div><div class="item-count" id="busuanzi_value_site_pv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">最后更新时间 :</div><div class="item-count" id="last-push-date" data-lastPushDate="2024-05-16T03:40:00.070Z"><i class="fa-solid fa-spinner fa-spin"></i></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2024 By 侯玉东</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside-config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="go-up" type="button" title="回到顶部"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/blog/js/utils.js"></script><script src="/blog/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.umd.min.js"></script><div class="js-pjax"><script>window.typedJSFn = {
  init: (str) => {
    window.typed = new Typed('#subtitle', Object.assign({
      strings: str,
      startDelay: 300,
      typeSpeed: 150,
      loop: true,
      backSpeed: 50,
    }, null))
  },
  run: (subtitleType) => {
    if (true) {
      if (typeof Typed === 'function') {
        subtitleType()
      } else {
        getScript('https://cdn.jsdelivr.net/npm/typed.js/dist/typed.umd.min.js').then(subtitleType)
      }
    } else {
      subtitleType()
    }
  }
}
</script><script>function subtitleType () {
  if (true) {
    typedJSFn.init(["生命不息，奋斗不止"])
  } else {
    document.getElementById("subtitle").textContent = "生命不息，奋斗不止"
  }
}
typedJSFn.run(subtitleType)</script></div><div class="aplayer no-destroy" data-id="8873950678" data-server="netease" data-type="playlist" data-fixed="true" data-autoplay="true"> </div><script defer="defer" id="ribbon" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/dist/canvas-ribbon.min.js" size="150" alpha="0.6" zIndex="-1" mobile="false" data-click="false"></script><script defer="defer" id="fluttering_ribbon" mobile="false" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/dist/canvas-fluttering-ribbon.min.js"></script><script id="click-heart" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/dist/click-heart.min.js" async="async" mobile="false"></script><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.js"></script><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/metingjs/dist/Meting.min.js"></script><script src="https://cdn.jsdelivr.net/npm/pjax/pjax.min.js"></script><script>let pjaxSelectors = ["head > title","#config-diff","#body-wrap","#rightside-config-hide","#rightside-config-show",".js-pjax"]

var pjax = new Pjax({
  elements: 'a:not([target="_blank"])',
  selectors: pjaxSelectors,
  cacheBust: false,
  analytics: false,
  scrollRestoration: false
})

document.addEventListener('pjax:send', function () {

  // removeEventListener
  btf.removeGlobalFnEvent('pjax')
  btf.removeGlobalFnEvent('themeChange')

  document.getElementById('rightside').classList.remove('rightside-show')
  
  if (window.aplayers) {
    for (let i = 0; i < window.aplayers.length; i++) {
      if (!window.aplayers[i].options.fixed) {
        window.aplayers[i].destroy()
      }
    }
  }

  typeof typed === 'object' && typed.destroy()

  //reset readmode
  const $bodyClassList = document.body.classList
  $bodyClassList.contains('read-mode') && $bodyClassList.remove('read-mode')

  typeof disqusjs === 'object' && disqusjs.destroy()
})

document.addEventListener('pjax:complete', function () {
  window.refreshFn()

  document.querySelectorAll('script[data-pjax]').forEach(item => {
    const newScript = document.createElement('script')
    const content = item.text || item.textContent || item.innerHTML || ""
    Array.from(item.attributes).forEach(attr => newScript.setAttribute(attr.name, attr.value))
    newScript.appendChild(document.createTextNode(content))
    item.parentNode.replaceChild(newScript, item)
  })

  GLOBAL_CONFIG.islazyload && window.lazyLoadInstance.update()

  typeof panguInit === 'function' && panguInit()

  // google analytics
  typeof gtag === 'function' && gtag('config', '', {'page_path': window.location.pathname});

  // baidu analytics
  typeof _hmt === 'object' && _hmt.push(['_trackPageview',window.location.pathname]);

  typeof loadMeting === 'function' && document.getElementsByClassName('aplayer').length && loadMeting()

  // prismjs
  typeof Prism === 'object' && Prism.highlightAll()
})

document.addEventListener('pjax:error', e => {
  if (e.request.status === 404) {
    pjax.loadUrl('/blog/404.html')
  }
})</script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>